﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace postSale.forms
{
    public partial class processAssignEdit : processEdit
    {
        public processAssignEdit()
        {
            try
            {
                InitializeComponent();
            }
            catch (Exception er)
            {
                this.ShowError(er);
            }
        }
        public override void LockEdit()
        {
            base.LockEdit();
            cbStatus.Enabled = false; 
        }
        protected override bool UpdateData(DataRow row)
        {
            data.postSaleDS.tasksRow taskRow = (data.postSaleDS.tasksRow)row;
            taskRow.status = (byte)(taskRow.IsworkByNull()?common.CommonStatus.New:common.CommonStatus.Processing); 
            taskRow.EndEdit();
            taskTA.Update(taskRow);
            taskRow.AcceptChanges();
            return true;
        }
    }
}
